sociall.account = {
	
	init : function(){
		Event.observe($('AccountCommunityId'), 'change', sociall.account.handleAccessData);
	},//sociall.accounts.init
	
	handleAccessData : function(e){
		//show or hide access_data when needed
		if(e.target.selectedIndex == 2 || e.target.selectedIndex == 1){
			//we selected facebook or twitter, we do not need ask for username and password
			$('access_data').hide();
		}
		else
			$('access_data').show();
	}//sociall.accounts.handleAccessData
	
}//sociall.account

document.observe('dom:loaded', function(){
	sociall.account.init();
	});